# Path relativo al directorio principal del proyecto
DIR_SODIUM_BASE = ../..

include $(DIR_SODIUM_BASE)/Makefile.cfg

OBJETOS_TST:= tst_time.bin 

all: $(OBJETOS_TST)

%.bin: $(DIR_USR)/lib/_start.o %.o $(DIR_USR)/lib/libsodium.o
	ld $(LDFLAGS) --cref -o $*.ld -Ttext 0x0 -N $^
	objcopy -R .comment -R .note -S $*.ld $@

%.o: %.c
	$(CC) $(CFLAGS) -c $<

%.o: %.asm
	$(AS) $(ARFLAGS) -f elf $< -o $@ -l $@.lst

clean:
	$(RM) *.lst *.s *.i *.o *.ld *.bin
